import request from '@/utils/request'

export default {
    //条件分页讲师列表
    getTeacherList(current,limit,teacherQuery){
        return request({
            url: `/eduservice/edu-teacher/pageTeacherCondition/${current}/${limit}`,
            method: 'post',
            //后端使用RequestBody获取数据
            //data表示把对象转换json进行传递
            data:teacherQuery
          })
    },
    //删除讲师
    deleteTeacherById(id){
        return request({
            url: `/eduservice/edu-teacher/${id}`,
            method: 'delete'
        })
    },
    //添加讲师
    addTeacher(eduTeacher){
        return request({
            url: `/eduservice/edu-teacher/addTeacher`,
            method: 'post',
            data: eduTeacher
        })
    },
    //查询讲师
    getTeacherById(id){
        return request({
            url: `/eduservice/edu-teacher/getTeacher/${id}`,
            method: 'get'
        })
    },
    //修改讲师
    updateTeacherInfo(eduTeacher){
        return request({
            url: `/eduservice/edu-teacher/updateTeacher`,
            method: 'post',
            data: eduTeacher
        })
    }
}